home *** CD-ROM | disk | FTP | other *** search
/ AGA Toolkit '97 / The AGA Toolkit '97.iso / miscellaneous / science / maths / calc / calc.man < prev    next >
Encoding:
Text File  |  1996-09-07  |  6.1 KB  |  203 lines

  1. calc 1                                                              15nov93
  2.  
  3. NAME
  4.     calc - arbitrary precision calculator
  5.  
  6. SYNOPSIS
  7.     calc [-h] [-q] [calc_cmd]
  8.  
  9. DESCRIPTION
  10.  
  11. CALC COMMAND LINE
  12.  
  13.     -h    Print a help message. This option implies -q.
  14.         This is equivalent to the calc command help help.
  15.  
  16.     -q    Disable the use of the CALCRC startup library scripts.
  17.  
  18.     Without calc_cmd, calc operates interactively. If one or more 
  19.     calc_cmds are given on the command line, calc will execute them
  20.     and exit.
  21.  
  22.     Normally on startup, calc attempts to execute a collection 
  23.     of library scripts.  The environment variable CALCRC (if non-
  24.     existent then a compiled in value) contains a ; separated list of
  25.     startup library scripts.  No error conditions are produced if these
  26.     startup library scripts are not found.
  27.  
  28.     The environment variable CALCPATH (if non-existent then a compiled
  29.     in value) contains a ; separated list of search directories.
  30.     If a file does not begin with a volume name, then it is searched for
  31.     under each directory listed in the CALCPATH. It is an error if no
  32.     such readable file is found.
  33.  
  34.     For more information use the following calc commands:
  35.  
  36.         help usage
  37.         help help
  38.         help environment
  39.  
  40. OVERVIEW
  41.  
  42.     Calc is arbitrary precision arithmetic system that uses a C-like
  43.     language.  Calc is useful as a calculator, an algorithm prototyped
  44.     and as a mathematical research tool. More importantly, calc provides
  45.     one with a machine independent means of computation.
  46.  
  47.     Calc comes with a rich set of builtin mathematical and programmatic
  48.     functions.
  49.  
  50.     Calc is distributed with library of scripts.  Written in the same
  51.     C-like language, library scripts may be read in and executed during
  52.     a calc session.  These library scripts are also provided because they
  53.     are useful and to serve as examples of the calc language.  One may
  54.     further extend calc thru the use of user defined scripts.
  55.  
  56.     Internally calc represents numeric values as fractions reduced to
  57.     their lowest terms.  The numerators and denominators of these factions
  58.     may grow to arbitrarily large values. Numeric values read in are
  59.     automatically converted into rationals.  The user need not be aware
  60.     of this internal representation.
  61.  
  62.     For more information use the following calc commands:
  63.  
  64.         help intro
  65.         help builtin
  66.         help stdlib
  67.         help define
  68.         show builtins
  69.         show functions
  70.  
  71. DATA TYPES
  72.  
  73.     Fundamental builtin data types include integers, real numbers, 
  74.     rational numbers, complex numbers and strings.
  75.  
  76.     By use of an object, one may define an arbitrarily complex
  77.     data types.  One may define how such objects behave a wide range of
  78.     operations such as addition, subtraction, multiplication, division,
  79.     negation, squaring, modulus, rounding, exponentiation, equality,
  80.     comparison, printing and so on.
  81.  
  82.     For more information use the following calc commands:
  83.  
  84.         help types
  85.         help obj
  86.         show objfuncs
  87.  
  88. VARIABLES
  89.  
  90.     Variables in calc are typeless. In other words, the fundamental type
  91.     of a variable is determined by its content. Before a variable is
  92.     assigned a value it has the value of zero.
  93.  
  94.     The scope of a variable may be global, local to a file, or local to a
  95.     procedure.  Values may be grouped together in a matrix, or into a
  96.     a list that permits stack and queue style operations.
  97.  
  98.     For more information use the following calc commands:
  99.  
  100.         help variable
  101.         help mat
  102.         help list
  103.         show globals
  104.  
  105. INPUT/OUTPUT
  106.  
  107.     A leading ``0x'' implies a hexadecimal value, a leading ``0b'' implies
  108.     a binary value, and a ``0'' followed by a digit implies an octal value.
  109.     Complex numbers are indicated by a trailing ``i'' such as in ``3+4i''.
  110.     Strings may be delimited by either a pair of single or double quotes.
  111.     By default, calc prints values as if they were floating point numbers.
  112.     One may change the default to print values in a number of modes
  113.     including fractions, integers and exponentials.
  114.  
  115.     A number of stdio-like file I/O operations are provided. One may open,
  116.     read, write, seek and close files.
  117.  
  118.     For more information use the following calc command:
  119.  
  120.         help file
  121.  
  122. CALC LANGUAGE
  123.  
  124.     The calc language is a C-like language.  The language includes
  125.     commands such as variable declarations, expressions, tests, labels,
  126.     loops, file operations, function calls. These commands are very
  127.     similar to their counterparts in C.
  128.  
  129.     The language also include a number of commands particular to calc
  130.     itself.  These include commands such as function definition, help, 
  131.     reading in library scripts, dump files to a file, error notification, 
  132.     configuration control and status.
  133.  
  134.     For more information use the following calc command:
  135.  
  136.         help command
  137.         help statement
  138.         help expression
  139.         help operator
  140.         help config
  141.  
  142. FILES
  143.  
  144.     CALCDIR:lib/*.cal
  145.         library scripts shipped with calc
  146.  
  147.     CALCDIR:help/*
  148.         help files
  149.  
  150. ENVIRONMENT
  151.  
  152.     CALCPATH
  153.         A ;-separated list of directories used to search for
  154.         scripts filenames that do not begin with a volume name.
  155.         Default value: Current Dir;CALCDIR:lib/
  156.  
  157.     CALCRC
  158.         On startup (unless -h or -q was given on the command line),
  159.         calc searches for files along this ;-separated environment
  160.         variable.  Default value: CALCDIR:lib/startup;S:.calcrc
  161.  
  162.     CALCHELP
  163.         The name of the directory calc searches for on-line help.
  164.         Default value: CALCDIR:help/
  165.  
  166.     PAGER
  167.         The name of the text viewing program calc uses to display
  168.         the on-line help files.  Default value: more
  169.  
  170. CREDIT
  171.  
  172.     Written by David I. Bell.
  173.  
  174.     Thanks for suggestions and encouragement from Peter Miller, Neil
  175.     Justusson, and Landon Noll.
  176.  
  177.     Portions of this program are derived from an earlier set of public
  178.     domain arbitrarily precision routines which was posted to the net
  179.     around 1984.  By now, there is almost no recognizable code left from
  180.     that original source.
  181.  
  182.     Most of this source and binary is:
  183.         Copyright (c) 1994 David I. Bell
  184.  
  185.     Some files are a copyrighted David I. Bell and Landon Noll.
  186.  
  187.     Permission is granted to use, distribute, or modify this source,
  188.     provided that this copyright notice remains intact.
  189.  
  190.     Send calc comments, suggestions, bug fixes, enhancements
  191.     and interesting calc scripts that you would like you see included 
  192.     in future distributions to:
  193.  
  194.         dbell@canb.auug.org.au
  195.         chongo@toad.com
  196.  
  197.     Ported to the Amiga by Steve Leblanc.  Send comments, suggestions,
  198.     and bug fixes concerning the Amiga port to:
  199.  
  200.         lupus@cam.org
  201.  
  202.     Enjoy!
  203.